<template>
    <div>
        <echarts-Bar :viewData="echartsData"></echarts-Bar>
        <!-- md -->
        <div class="markdown-body">
            <barChartsMD></barChartsMD>
        </div>
    </div>
</template>
<script>
import barChartsMD from "../md/barChartsMD.md"
import echartsBar from "@/home/echart/barCharts1"
export default {
    components:{
        barChartsMD,
        echartsBar
    },
    data() {
        return {
            echartsData:{
                viewTitle:"堆叠柱状图",//标题 必填
                viewHeight:'640px',//图形高度，必填
                seiveApi:'',//接口方法
                serachParam:{},
                seriesData:[//图形数据
                    {name: 'Direct',data: [320, 302, 301, 334, 390, 330, 320]},
                    {name: 'Mail Ad', data: [120, 132, 101, 134, 90, 230, 210]},
                    {name: 'Affiliate Ad', data: [220, 182, 191, 234, 290, 330, 310]},
                    {name: 'Video Ad', data: [150, 212, 201, 154, 190, 330, 410]},
                    {name: 'Search Engine',data: [820, 832, 901, 934, 1290, 1330, 1320]},
                ],
                options:{
                    legend:{//图例参数
                        show:false,//是否显示图例
                        orient:'horizontal',//布局方式，默认水平 'horizontal' ¦ 'vertical'垂直
                        type:'scroll',//图例样式 plain\scroll 普通/可滚动翻页，当图例数量较多时使用
                        left:'center',// left right center 图例显示位置
                        icon:'circle',//图例样式 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none' 或图片'image://http://xxx.xxx.xxx/a/b.png'
                        itemWidth:20,//icon宽度
                        itemHeight:20,//icon高度
                        textStyle: {
                            color: '#333'  // 图例文字颜色
                        },
                        data:['Direct', 'Mail Ad', 'Affiliate Ad', 'Video Ad', 'Search Engine']//图例显示数据 例：["苹果","香蕉","西瓜","杨梅"] 要与series的name统一
                    },
                    xAxis:{
                        type:"category",
                        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],// x轴显示数据
                        axisLabel:{ //x轴样式
                            color:"red",
                            fontSize:"12"
                        }
                    },
                    yAxis: {
                        axisLabel: { //y轴样式
                            color: 'red',
                            fontSize:"12"
                        },
                    },
                }
            }
        };
    },
    methods: {
        
    }
}
</script>